SftTree/NET 2.0

Sort Method, ItemCollectionClass Class

Softel vdm, Inc.

Sorts the items in the item collection.

Syntax      ItemCollectionClass Class (Softelvdm.SftTreeNET)

VB   

Public Sub Sort()
Public Sub Sort( ByVal Comparer As IComparer )
Public Sub Sort( _
     ByVal Comparer As IComparer, _
     ByVal Recursive As Boolean )

C#   

public void Sort();
public void Sort( IComparer Comparer );
public void Sort(
     IComparer Comparer,
     bool Recursive );

C++   

public: void Sort();
public: void Sort( IComparer^ Comparer );
public: void Sort(
     IComparer^ Comparer,
     bool Recursive );

Comparer

Defines a method that compares two items or null/Nothing to use the SortAscending class implementation.

Recursive

Defines whether the dependents are also sorted, True to sort all direct and indirect dependents also, otherwise False. The default is False.

Comments

The Sort method sorts the items in the item collection.

Comparer implements a method that is used to compare two items. The sorting process calls this method repeatedly to sort the item collection. The method can sort items based on any of their attributes, even multiple keys.

Default implementations are available to sort cell text in a column ascending (SortAscending) or descending (SortDescending). Samples, including the implementation of SortAscending and SortDescending are shown below.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com